package com.proj.entity;

// Generated 2015-1-18 14:42:40 by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Topic generated by hbm2java
 */
@Entity
@Table(name = "topic", catalog = "webhr")
public class Topic implements java.io.Serializable {

	private String topicId;
	private String topicName;
	private String topicDesc;
	private String topicImage;
	private Date createTime;
	private Set questionTopics = new HashSet(0);

	public Topic() {
	}

	public Topic(Date createTime) {
		this.createTime = createTime;
	}

	public Topic(String topicName, String topicDesc, String topicImage,
			Date createTime, Set questionTopics) {
		this.topicName = topicName;
		this.topicDesc = topicDesc;
		this.topicImage = topicImage;
		this.createTime = createTime;
		this.questionTopics = questionTopics;
	}

	@Id
	@Column(name = "topic_id", unique = true, nullable = false)
	public String getTopicId() {
		return this.topicId;
	}

	public void setTopicId(String topicId) {
		this.topicId = topicId;
	}

	@Column(name = "topic_name", length = 30)
	public String getTopicName() {
		return this.topicName;
	}

	public void setTopicName(String topicName) {
		this.topicName = topicName;
	}

	@Column(name = "topic_desc", length = 1000)
	public String getTopicDesc() {
		return this.topicDesc;
	}

	public void setTopicDesc(String topicDesc) {
		this.topicDesc = topicDesc;
	}

	@Column(name = "topic_image", length = 100)
	public String getTopicImage() {
		return this.topicImage;
	}

	public void setTopicImage(String topicImage) {
		this.topicImage = topicImage;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time", nullable = false, length = 19)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}


}
